test: improve test coverage for server scenarios#179
Open
schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
Open
test: improve test coverage for server scenarios#179schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
- Install @vitest/coverage-v8 provider for code coverage analysis - Add coverage configuration to vitest.config.ts with v8 provider - Generate coverage reports in text, JSON, and HTML formats - Exclude node_modules, dist, test files, and examples from coverage - Add npm script 'test:coverage' to run tests with coverage reporting Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add 42 tests covering InitializeScenario, ToolsCallScenario, SSERetryScenario, and ElicitationClientDefaultsScenario - Test scenario properties (name, description, specVersions) - Test scenario lifecycle methods (start, stop, getChecks) - Test start/stop cycles and server URL generation - Test checks collection and spec version support - Test scenario descriptions and naming conventions - Test scenario construction and independence This improves coverage for scenario initialization and lifecycle code paths. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Ignore generated coverage reports from vitest to avoid committing build artifacts and maintaining a cleaner repository state. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Author
|
@maciej-kisiel could you please review this PR? |
Contributor
|
@schlpbch I don't mean this in any wrong way, but may I ask you to provide more details why you need a review from my side? I'm not a maintainer of this repository, so I have to say I'm a bit surprised by the request :) |
Author
|
Dear Mace
Based on your activity in this repo, I figured that you must be a
maintainer 🤗
Sorry for that!
All the best
-as
Maciej Kisiel ***@***.***> schrieb am Mi., 4. März 2026,
10:08:
… *maciej-kisiel* left a comment (modelcontextprotocol/conformance#179)
<#179 (comment)>
@schlpbch <https://github.com/schlpbch> I don't mean this in any wrong
way, but may I ask you to provide more details why you need a review from
my side? I'm not a maintainer of this repository, so I have to say I'm a
bit surprised by the request :)
—
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AENORWL3QKA7WAQNET6Y63L4O7XCDAVCNFSM6AAAAACWF644AKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSOJWGIYTCMZRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
|
No worries! Based on my information @pcarleton is the main maintainer of this repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive test suite for server scenario lifecycle and properties to improve code coverage.
Test Coverage
Files Changed
src/scenarios/server/index.test.ts(332 lines, 42 tests)Test Plan
pnpm test- all 126 tests passpnpm test:coverage- coverage report generated🤖 Generated with Claude Code